<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:altova="http://www.altova.com">
	<xsl:output version="4.0" method="html" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
	<xsl:param name="SV_OutputFormat" select="'HTML'"/>
	<xsl:variable name="XML" select="/"/>
	<xsl:template match="/" id="html>
			<head>
				<title>
					<xsl:text>Museo del Prado - Obras Maestras</xsl:text>
				</title>
				<style type="text/css">
body {margin:0; padding:0; font-family:Arial; color:#7d7d7d}

.contenedor {width:490px}
.linea-puntos {
	width:490px;
	clear:both;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/linea-puntos.gif) repeat-x;
	font-size:1px;
	margin:5px 0 8px 0
}
.contenedor p {
	font-size:11px;
	color:#666;
	width:490px;
}

h1 {font-size:18px; font-weight:bold; color:#999; margin:3px 0 0 0}
img {border:4px solid #ccc}
#caja-cuadros {width:490px; margin-top:12px}
	#caja-cuadros a{text-decoration:none}

.logo {border:0}

#capa1 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 51px;
	top: 160px; *top:179px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 9px
}

#capa2 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 151px;
	top: 160px; *top:179px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 9px
}
#capa3 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 215px;
	top: 160px; *top:179px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:7px 6px 2px 9px
}
#capa4 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 307px;
	top: 160px; *top:179px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:5px 6px 2px 3px
}
#capa5 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 224px;
	top: 160px; *top:179px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa6 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 54px;
	top: 245px; *top:259px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa7 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 150px;
	top: 245px; *top:259px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}

#capa8 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 219px;
	top: 245px; *top:259px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa9 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 307px;
	top: 245px; *top:259px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa10 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 224px;
	top: 245px; *top:259px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa11 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 54px;
	top: 328px; *top:343px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa12 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 150px;
	top: 328px; *top:343px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa13 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 219px;
	top: 328px; *top:343px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}
#capa14 {
	position:absolute;
	width:136px;
	height:51px;
	z-index:1;
	left: 307px;
	top: 328px; *top:343px;
	visibility:hidden;
	background:url(http://madgigapixel.googlecode.com/svn/trunk/img_bocata/fondo-capa.gif) no-repeat;
	font:normal 11px Arial; 
	color:#000;
	padding:12px 6px 2px 12px
}

.gris {color:#999}
</style>
				<script language="javascript">
					<xsl:comment><![CDATA[ 
    function MM_showHideLayers() { //v9.0
      var i,p,v,obj,args=MM_showHideLayers.arguments;
      for (i=0; i<(args.length-2); i+=3) 
      with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
        if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
        obj.visibility=v; }
    }
]]></xsl:comment>
				</script>
			</head>
			<body>
				<div class="contenedor" style="">
					<img src="http://madgigapixel.googlecode.com/svn/trunk/img_bocata/logo.gif" alt="Museo del Prado" class="logo"/>
					<h1>
            Obras Maestras
        </h1>
					<div class="linea-puntos">
						<xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
					</div>
					<p>
						<xsl:text disable-output-escaping="yes"><![CDATA[Disfruta en <strong>Google Earth</strong> de las <strong>Obras Maestras</strong> del Museo Nacional del Prado con las im&aacute;genes <strong>m&aacute;s grandes del mundo</strong>, y sobrevuela una reproducci&oacute;n en 3D del museo. <br/>
            Durante los pr&oacute;ximos d&iacute;as podr&aacute;s ver una Obra Maestra diferente. Para verlas todas juntas utiliza <a href="#">Google Earth</a><br/>
]]></xsl:text>
					</p>
					<div id="caja-cuadros">
						<xsl:for-each select="$XML">
							<xsl:for-each select="cuadros">
								<xsl:for-each select="cuadro">
									<!-- inicializar las variables del cuadro -->
									<xsl:variable name="titulo">
										<xsl:value-of select="nom"/>
									</xsl:variable>
									<xsl:variable name="disponibilidad">
										<xsl:value-of select="dis"/>
									</xsl:variable>
									<xsl:variable name="imagen">
										<xsl:value-of select="imag"/>
									</xsl:variable>
									<xsl:if test="@estado='inactivo'">
										<a href="#">
											<xsl:attribute name="title"><xsl:value-of select="$titulo"></xsl:value-of></xsl:attribute>
											<img>
												<xsl:attribute name="alt"><xsl:value-of select="$titulo"/></xsl:attribute>
												<xsl:attribute name="src">http://madgigapixel.googlecode.com/svn/trunk/img_bocata/<xsl:value-of select="substring($imagen,1,6)"/>_bn.jpg</xsl:attribute>
												<xsl:attribute name="onmouseover">MM_showHideLayers('capa<xsl:value-of select="position()"/>','','show');</xsl:attribute>
												<xsl:attribute name="onmouseout">MM_showHideLayers('capa<xsl:value-of select="position()"/>','','hide');</xsl:attribute>
											</img>
										</a>
										<xsl:text>&#13;&#10;</xsl:text>
										<div>
											<xsl:attribute name="id">capa<xsl:value-of select="position()"/></xsl:attribute>
											<xsl:value-of select="$titulo"/>
											<br/>
											<span class="gris">(Disponible <xsl:value-of select="$disponibilidad"/>)</span>
										</div>
									</xsl:if>
									<xsl:if test="@estado='activo'">
										<a>
											<xsl:attribute name="href"><![CDATA[http://89.17.221.55/gigaproject/info.php?nc=]]><xsl:value-of select="cod"/><![CDATA[&type=om]]></xsl:attribute>
										<img>
											<xsl:attribute name="alt"><xsl:value-of select="$titulo"/></xsl:attribute>
											<xsl:attribute name="src">http://madgigapixel.googlecode.com/svn/trunk/img_bocata/<xsl:value-of select="$imagen"/></xsl:attribute>
										</img>
										<xsl:text>&#13;&#10;</xsl:text>
										</a>
									</xsl:if>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:for-each>
					</div>
				</div>
			</body id="/html>
	</xsl:template>
</xsl:stylesheet>
